<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <!-- 2. 引入vuejs -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
  </head>
<style>
    div div{
width: 200px;
height: 100px;
text-align: center;
line-height: 100px;
font-size: 25px;
    }
</style>
  <body>
    <!-- 1. 准备容器 -->
    <div id="app">
      <!-- 4. 渲染数据 -->
      <div v-html="content"></div>
      <button @click="change">翻转时间</button>

    </div>
    <script>
      // 3. 创建Vue实例x
      const app = new Vue({
        el: "#app",
        data: {
            content:'Hello World'
        },
        methods: {
            change(){
                this.content=this.content.split('').reverse().join('')

            }
        },
      });
    </script>
  </body>
</html>
